<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <title>创建新容器</title>
    <jsp:include page="common/common_head.jsp"></jsp:include>


</head>
<body data-spy="scroll" data-target=".navbar">


<jsp:include page="common/common_banner_app.jsp"></jsp:include>
<div style="height:30px"></div>
<jsp:include page="nav/container_nav.jsp"></jsp:include>
<div style="height:30px"></div>
<div class="container">

    <h2>创建新容器</h2>

    <form role="form" action="/docker/container_create.html" method="post">
        <div class="form-group">
            <label for="slaves">docker宿主机:</label>
            <input type="text" class="form-control" name="slaves" id="slaves" value="${hostsStr}">
        </div>
        <div class="form-group">
            <label for="imageName">镜像名称:</label>
            <input type="text" class="form-control" name="imageName" id="imageName" value="mammuthus-agent">
        </div>

        <div class="form-group">
            <label for="name">容器名称:</label>
            <input type="text" class="form-control" name="name" id="name" value="">
        </div>

        <div class="form-group">
            <label for="masterIP">Master节点IP:</label>
            <input type="text" class="form-control" name="masterIP" id="masterIP" value="${masterIp}">
        </div>

        <div class="form-group">
            <label for="net" >网络类型:</label>
            <select name="net" id="net">
                <option value="--net=host" <c:if test="${net eq '--net=host'}">selected</c:if> >host模式</option>
                <option value="--net=container" <c:if test="${net eq '--net=container'}">selected</c:if>>container模式</option>
                <option value="--net=none" <c:if test="${net eq '--net=none'}">selected</c:if>>无网络</option>
                <option value="--net=bridge" <c:if test="${net eq '--net=bridge'}">selected</c:if> >bridge模式</option>
            </select>
        </div>

        <div class="form-group">
            <label for="setHostname" >是否修改容器hostname:</label>
            <input type="text" class="form-control" name="setHostname" id="setHostname" value="true">
        </div>

        <div style="height:30px"></div>
        <h3>高级选项(可选填):</h3>
        <div style="height:30px"></div>

        <div class="form-group">
            <label for="volumeSource" >主机目录:</label>
            <input type="text" class="form-control" name="volumeSource" id="volumeSource" value="">
        </div>

        <div class="form-group">
            <label for="volumeTarget" >容器目录:</label>
            <input type="text" class="form-control" name="volumeTarget" id="volumeTarget" value="">
        </div>

        <div class="form-group">
            <label for="memory" >内存限制(单位M):</label>
            <input type="text" class="form-control" name="memory" id="memory" value="">
        </div>

        <input type="hidden" name="withIp" value="${withIp}"/>

        <button type="submit" class="btn btn-default">提交</button>
    </form>


    <jsp:include page="common/common_js.jsp"></jsp:include>


    <script>


    </script>
</body>
</html>